package com.base.common;

import com.baomidou.mybatisplus.annotations.TableField;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import java.io.Serializable;

/**
 * @title
 * @Author 覃球球
 * @Version 1.0 on 2017/12/20.
 * @Copyright 长笛龙吟
 */
public class BaseModel implements Serializable {
    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }

    @TableField(exist = false)
    private String orderName;  //排序字段

    @TableField(exist = false)
    private String orderType; //排序方式  "ase 升序  desc 降序"

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public boolean isOrderAsc(){
        if("asc".equalsIgnoreCase(orderType)){
            return true;
        }
        return false;
    }
}
